package com.hr.runnerbuddy;

import android.app.Activity;
import android.content.Context;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

public class Maperror extends Activity{
	
	private LinearLayout myLayout;
	private View maperrorview;
	private Context _context;
	
	public void onCreate(){
//		LinearLayout myLayout = (LinearLayout)findViewById(R.id.laadparcouroptiesxml);
//        View hiddenInfo = getLayoutInflater().inflate(R.layout.parcouropties_maxtijd, myLayout, false);
//        myLayout.removeAllViewsInLayout();
//        myLayout.addView(hiddenInfo);
	}
	
	public Maperror(Context context){
		_context = context;
		myLayout = (LinearLayout)((Activity) _context).findViewById(R.id.maperror);
        maperrorview = ((Activity) _context).getLayoutInflater().inflate(R.layout.mapalert, myLayout, false);
	}
	
	public void setText(String errmes){
		TextView maperror = (TextView)((Activity) _context).findViewById(R.id.mapalert);
		maperror.setText(errmes);
	}
	
	public void showMapError(){
		myLayout.removeAllViewsInLayout();
        myLayout.addView(maperrorview);
	}
	
	public void hideMapError(){
		myLayout.removeAllViewsInLayout();
	}
	
	public void blinkMapError(){
        myLayout.addView(maperrorview);
	}
}